<table width="100%" cellpadding="0" cellspacing="0">
	<tbody>
		<tr bgcolor="#F0F0F0">
		  <td height="40" colspan="2"><h3 style="margin-left:5px">All Projects:&nbsp;<?=$this->projectData['pname']?>&nbsp;<font size="1">(Key: &nbsp;<?=$this->projectData['pkey']?>)</font></h3></td>
		</tr>
		<tr>
			<td width="70%" valign="top">
				<table cellpadding="0" cellspacing="0" width="100%">
					<tr>
						<td>
							<div><b>Project Lead:&nbsp;</b>&nbsp;<?=$this->projectData['lead']?></div>
							<div><b>URL:</b><a href="<?=$this->projectData['url']?>"><?=$this->projectData['url']?></a></div>
							<div><b>Description:</b></div>
							<div><?=$this->projectData['description']?></div>
							<br>
							<?php if ($this->acl->isAllowed($this->userGroup, null, "createissue")) {?>
							<div>
								<img src="<?=$this->baseUrl()/images/bullet.gif?>" border="0" width="8" height="8" /><a href="<?=$this->baseUrl()?>/issue/createstep1/project/<?=$this->projectId?>">Create new issue in project <?=$this->projectData['pname']?></a>
							</div>
							<?php }?>
							<?php if ($this->acl->isAllowed($this->userGroup, null, "admin")) {?>
							<div><img src="<?=$this->baseUrl()/images/bullet.gif?>" border="0" width="8" height="8" /><a href="<?=$this->baseUrl()?>/project">Administor Project</a></div>
							<?php }?>
						</td>
					</tr>
				</table>
				<br>
				<table width="98%" cellspacing="0" cellpadding="0" align="center">
				<tbody>
					<tr>
						<td>
							<table align="center" border="0" cellpadding="2" cellspacing="0" width="100%" style="border:0px">
								<tbody>
									<tr>
										<td width="1%"><b>Select:</b>&nbsp;</td>
										<td align="center" width="10%"><b><a href="<?=$this->baseUrl()?>/issue/openissues/pid/<?=$this->projectId?>">Open Issues</a></b></td>
										<td align="center" width="10%" bgcolor="#bbbbbb" nowrap="nowrap">
										<font color="#ffffff" width="8%"><b>Road Map</b></font></td>
										<td align="center" width="10%"><b>Change Log</b></td>
										<td align="center" width="10%"><b>Popular Issues</b></td>
										<td align="center" width="10%"><b><a href="<?=$this->baseUrl()?>/issue/versions/projectId/<?=$this->projectId?>">Versions</a></b></td>
										<td align="center" width="10%"><b><a href="<?=$this->baseUrl()?>/issue/components/project/<?=$this->projectId?>">Components</a></b></td>
									</tr>
								</tbody>
							</table>
						</td>
				  </tr>
						<tr>
						<td colspan="2">
							<table width="100%" cellspacing="0" style="border:1px solid #bbbbbb">
								<tbody>
									<tr bgcolor="#f0f0f0">
										<td>
											<h2>Road Map</h2>
											<div><b>View personal road map</b></div>
											<div><b>Scop:</b>next 3 versions | <b>all versions</b></div>
										</td>
									</tr>
									<tr>
										<td>
										<?php foreach ($this->versionData as $version) { ?>
											<table width="100%" border="0" cellpadding="2" cellspacing="0">
												<tbody>
													<tr>
														<td colspan="6" bgcolor="#fffff0">
															<table width="100%">
																<tr>
																	<td>
																		<h4><?=$version['vname']?></h4>
																		<div><?=$version['description']?></div>
																	</td>
																	<td align="right">
																		<table width="60%" border="0" cellpadding="0" cellspacing="0">
																			<tr>
																				<td width="1%">Progress:&nbsp;</td>
																				<?php if($version['resolvedIssues']) {?>
																				<td height="10" valign="top" bgcolor="#009900" style ="width:<?=round(($version['resolvedIssues']/$version['totalIssues'])*100)?>px">
																				<img src="<?=$this->baseUrl()?>/images/spacer.gif" width="100%" height="10">																				</td>
																				<?php }?>
																				<?php if($version['unresolvedIssues']) {?>
																				<td style ="width:<?=round(($version['unresolvedIssues']/$version['totalIssues'])*100)?>px" valign="top" bgcolor="#FF0000">
																				<img src="<?=$this->baseUrl()?>/images/spacer.gif" width="100%" height="10">
																				</td>
																				<?php }?>
																			</tr>
																			<tr>
																				<td colspan="3"><?=$version['resolvedIssues']?> of <?=$version['totalIssues']?> issues have been resolved
</td>
																			</tr>
																	  </table>
																	</td>
																</tr>
														  </table>
														</td>
													</tr>
													<?php 
														$i = 1;
														foreach ($version['issues'] as $versionIssue) { ?>
													<tr <?php if($i%2) { echo 'bgcolor="#ffffff"';} else { echo 'bgcolor="#FAFAFA";';}?>>
														<td width="5%">&nbsp;<img src="<?=$this->baseUrl().$versionIssue['issueTypeIcon']?>" title="<?=$versionIssue['issueTypeName']?> - <?=$versionIssue['issueTypeDesc']?>"></td>
														<td width="1%" nowrap="nowrap">&nbsp;<?=$versionIssue['pkey']?></td>
														<td width="8%">&nbsp;<?=$versionIssue['resolutionName']?></td>
														<td>&nbsp;<a href="<?=$this->baseUrl()?>/issue/view/id/<?=$versionIssue['id']?>"><?=$versionIssue['summary']?></a></td>
														<td width="5%">&nbsp;<img src="<?=$this->baseUrl().$versionIssue['priorityIcon']?>" title="<?=$versionIssue['priorityName']?> - <?=$versionIssue['priorityDesc']?>"></td>
														<td width="5%">&nbsp;<img src="<?=$this->baseUrl().$versionIssue['issueStatusIcon']?>" title="<?=$versionIssue['issueStatusName']?> - <?=$versionIssue['issueStatusDesc']?>"></td>
													</tr>
													<?php 
														$i++;
														}?>
												</tbody>
										  </table>&nbsp;
											<?php } ?>
									  </td>
									</tr>
								</tbody>
							</table>
						</td>
					</tr>
				</tbody>
			  </table>
			</td>
			<td width="30%" valign="top" style="background-color:#fffff0;border:1px solid #bbbbbb"><table width="90%" align="center" cellspacing="1">
              <tr>
                <td colspan="2"><h3 style="margin-left:10px;color:#003366;">Preset Filters</h3></td>
              </tr>
              <tr>
                <td width="50%" align="left"><a href="<?=$this->baseUrl()?>/filter/view/projectId/<?=$this->projectId?>">All</a></td>
                <td><a href="<?=$this->baseUrl()?>/filter/view/projectId/<?=$this->projectId?>/resolved/-1w">Resolved Recently</a></td>
              </tr>
              <tr>
                <td width="50%" align="left">Outstanding</td>
                <td><a href="<?=$this->baseUrl()?>/filter/view/projectId/<?=$this->projectId?>/created/-1w">Added Recently</a></td>
              </tr>
              <tr>
                <td width="50%" align="left"><a href="<?=$this->baseUrl()?>/filter/view/projectId/<?=$this->projectId?>/fixfor/-1">Unscheduled</a></td>
                <td><a href="<?=$this->baseUrl()?>/filter/view/projectId/<?=$this->projectId?>/updated/-1w">Updated Recently</a></td>
              </tr>
              <tr>
                <td width="50%" align="left"><a href="<?=$this->baseUrl()?>/filter/view/projectId/<?=$this->projectId?>/assigneeSelect/issue_current_user">Assign to me</a></td>
                <td>Most Important</td>
              </tr>
              <tr>
                <td width="50%" align="left"><a href="<?=$this->baseUrl()?>/filter/view/projectId/<?=$this->projectId?>/reporterSelect/issue_current_user">Reported by me</a></td>
                <td>&nbsp;</td>
              </tr>
            </table>
			<h3 style="margin-left:10px;color:#003366;">Project Summary</h3>
			
				<table width="90%" align="center" cellpadding="0" cellspacing="0">
					<tbody>
						<?php foreach ($this->projectSummary as $summary) {?>
						<tr>
							<td width="1%"><img src="<?=$this->baseUrl().$summary['issueStatusIcon']?>" align="absmiddle" title="<?=$summary['issueStatusName']?>"/></td>
							<td nowrap="">&nbsp;<?=$summary['issueStatusName']?></td>
							<td><?=$summary['c']?></td>
							<td width="60%">

								<table width="100%" cellpadding="0" cellspacing="0">
									<tr>
										<td width="<?=round($summary['c']/$this->totalIssues*100)?>%">
											<table cellpadding="0" cellspacing="0" width="100%">
												<tr>
													<td bgcolor="#3c78b5">
													<a><img src="<?=$this->baseUrl()?>/images/spacer.gif" width="100%" height="10"></a>
													</td>
												</tr>
											</table>
										</td>
										<td width="<?php echo (100-round($summary['c']/$this->totalIssues*100))?>">&nbsp;&nbsp;&nbsp;<?=round($summary['c']/$this->totalIssues*100)?>%</td>
									</tr>
								</table>
							</td>
						</tr>
						 <?php } ?>
					</tbody>
			  </table>
			 
			  <h3 style="margin-left:10px;color:#003366;">Open Issues</h3>
			  <h4>By Priority</h4>
			  <table width="90%" align="center" cellpadding="0" cellspacing="0">
					<tbody>
						<?php foreach ($this->openIssues as $issue) { ?>
						<tr>
							<td width="1%"><img src="<?=$this->baseUrl().$issue['priorityIcon']?>" align="absmiddle" /></td>
							<td nowrap="">&nbsp;<?=$issue['priority']?></td>
							<td><?=$issue['c']?></td>
							<td width="60%">
								<table width="100%" cellpadding="0" cellspacing="0">
									<tr>
										<td width="<?=round($issue['c']/$this->totalIssues*100)?>">
											<table cellpadding="0" cellspacing="0" width="100%">
												<tr>
													<td bgcolor="#3c78b5">
													<a title="2"><img src="<?=$this->baseUrl()?>/images/spacer.gif" width="100%" height="10"></a>
													</td>

												</tr>
											</table>
										</td>
										<td width="<?php echo (100-round($issue['c']/$this->totalIssues*100))?>">&nbsp;&nbsp;&nbsp;<?=round($issue['c']/$this->totalIssues*100)?>%</td>
									</tr>
								</table>
							</td>
						</tr>
						<?php } ?>
					</tbody>
			  </table>
			  <h4>By Assignee </h4>
			  <table width="90%" align="center" cellpadding="1" cellspacing="0" border="0">
                <tbody>
				<?php foreach ($this->openIssuesByAssignee as $issue) { ?>
                  <tr>
                    <td nowrap>
                        <?=$issue['assignee']?>
					</td>
                    <td><?=$issue['c']?></td>
                    <td width="60%">
							<table width="100%" cellpadding="0" cellspacing="0">
							<tr>
							  <td width="<?=round($issue['c']/$this->totalIssues*100)?>"><table cellpadding="0" cellspacing="0" width="100%">
								  <tr>
									<td bgcolor="#3c78b5"><a title="2"><img src="<?=$this->baseUrl()?>/images/spacer.gif" width="100%" height="10"></a> </td>
								  </tr>
							  </table>
						  </td>
                          <td width="<?php echo (100-round($issue['c']/$this->totalIssues*100))?>">&nbsp;&nbsp;&nbsp;
                              <?=round($issue['c']/$this->totalIssues*100)?>
                            %</td>
                        </tr>
                    </table>
					</td>
                  </tr>
				  <?php }?>
                </tbody>
              </table>
			</td>
		</tr>
	</tbody>
</table>